#include <iostream>
#include <string>
using namespace std;

void SWAP(float *ptr_x, float *ptr_y)
{
	float f;
	f = *ptr_x;
	*ptr_x = *ptr_y;
	*ptr_y = f;
}
void SWAP(float &x, float &y)
{
	float f; 
	f = x;
	x = y;
	y = f;
}
void SWAP(string &x, string &y)
{
	string s;
	s = x;
	x = y;
	y = s;
}
int main()
{
	float f1, f2;
	string s1, s2;

	cout << "Please enter two floats on the format (0.0 0.0): ";
	cin >> f1 >> f2;

	cout << "F1: " << f1 << " F2: " << f2 << endl;
	SWAP(&f1, &f2);
	cout << "F1: " << f1 << " F2: " << f2 << endl;
	SWAP(f1, f2);
	cout << "F1: " << f1 << " F2: " << f2 << endl;
	cout << "Please enter two strings on the format (text text):";
	cin >> s1 >> s2;
	cout << "S1: " << s1 << " S2: " << s2 << endl;
	SWAP(s1, s2);
	cout << "S1: " << s1 << " S2: " << s2 << endl;

	system("pause");
	return 0;
}